% Define approximate molar mass of components
molmass_yeastextract = 310; % g/L
molmass_tryptone = 71;

% Total carbon molar mass
molmass_LB = 10/molmass_yeastextract + 5/molmass_tryptone;
close all;
%% 37C LB
tempmat = monod_maxOD_LB_37C;
smat = size(tempmat);

conc1 = tempmat([1 2 3 4],1);
odmax1 = OD_calibrated_blanked(nanmean(tempmat([1 2 3 4],2:4),2));
odmax_err1 = OD_calibrated_blanked(nanstd(tempmat([1 2 3 4],2:4),0,2));
% Linear scale
figure;
errorbar(conc1/100*molmass_LB*1000,odmax1,odmax_err1, 'ro-', 'linewidth', 1);

set(gcf, 'position', [0 0 400 300])
set(gca, 'fontsize', 20);
xlabel('Concentration (mM)')
ylabel('Max OD600')
box off;
xlim([0 125]);

%% 30C LB
tempmat = monod_maxOD_LB_30C;
smat = size(tempmat);

conc1 = tempmat([1 2 3 4],1);
odmax1 = OD_calibrated_blanked(nanmean(tempmat([1 2 3 4],2:4),2));
odmax_err1 = OD_calibrated_blanked(nanstd(tempmat([1 2 3 4],2:4),0,2));
% Linear scale
hold on;
errorbar(conc1/100*molmass_LB*1000,odmax1,odmax_err1, 'ko-', 'linewidth', 1);

set(gcf, 'position', [0 0 400 300])
set(gca, 'fontsize', 20);
xlabel('Concentration (mM)')
ylabel('Max OD600')
box off;
xlim([0 125]);

%% 25C LB
tempmat = monod_maxOD_LB_25C;
smat = size(tempmat);

conc1 = tempmat([1 2 3 4],1);
odmax1 = OD_calibrated_blanked(nanmean(tempmat([1 2 3 4],2:4),2));
odmax_err1 = OD_calibrated_blanked(nanstd(tempmat([1 2 3 4],2:4),0,2));
% Linear scale
hold on;
errorbar(conc1/100*molmass_LB*1000,odmax1,odmax_err1, 'bo-', 'linewidth', 1);

set(gcf, 'position', [0 0 400 300])
set(gca, 'fontsize', 20);
xlabel('Concentration (mM)')
ylabel('Max OD600')
box off;
xlim([0 125]);